package com.example.myapplication.util;

import android.content.Context;
import android.content.Intent;
import android.net.Uri;

import com.example.myapplication.javaBean.PhotoBean;

import java.util.ArrayList;

public class PhotoUtil {
    public static ArrayList<String> format(ArrayList<PhotoBean> photoBeans){
        ArrayList<String> strings = new ArrayList<>();
        for (PhotoBean p :photoBeans){
            if (p.getType()==1){
                strings.add(p.getPath());
            }
        }
        return strings;
    }
    public  static void callPhone(Context context,String phoneNum){
        Intent intent = new Intent(Intent.ACTION_CALL);
        Uri data = Uri.parse("tel:" + phoneNum);
        intent.setData(data);
        context.startActivity(intent);
    }
}
